package ejemplo;


import org.uqbar.commons.model.ObservableObject;

public class Conversor extends ObservableObject {
	public static final String MILLAS = "millas";
	public static final String KILOMETROS = "kilometros";
	public static final String CONVERTIR = "convertir";
	
	private double millas;
	private double kilometros;

	// ********************************************************
	// ** Acciones
	// ********************************************************
	
	public void convertir() {
		this.setKilometros(this.getMillas() * 1.60934);
	}
	
	// ********************************************************
	// ** Atributos
	// ********************************************************

	public double getMillas() {
		return this.millas;
	}

	public void setMillas(double millas) {
		this.setProperty(MILLAS, millas);
	}

	public double getKilometros() {
		return this.kilometros;
	}

	public void setKilometros(double kilometros) {
		this.setProperty(KILOMETROS, kilometros);
	}

}
